from django.contrib import admin
import xadmin
from .models import Type
from .models import Blog
from .models import Comment
from .models import Collection
from .models import Good
# Register your models here.
class TypeAdmin(object):
    list_display = ('name','status','sort','ctime')
    list_per_page = 10
xadmin.site.register(Type, TypeAdmin)

class BlogAdmin(object):
    list_display = ('title','view','comments','goods','collections','status','ctime')
    list_per_page = 10
    style_fields = {"content": "ueditor"}
xadmin.site.register(Blog, BlogAdmin)

class CommentAdmin(object):
    list_display = ('blog','user',"ctime")
    list_per_page = 10
    style_fields = {"content": "ueditor"}
xadmin.site.register(Comment, CommentAdmin)

class CollectionAdmin(object):
    list_display = ('blog','user','ctime')
    list_per_page = 10
xadmin.site.register(Collection, CollectionAdmin)

class GoodAdmin(object):
    list_display = ('blog','user',"ctime")
    list_per_page = 10
xadmin.site.register(Good, GoodAdmin)